<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>libnoise: Documentation</title>
  <link rel='stylesheet' type='text/css' href='doxygen.css'>
  <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
 </head>
 <body>
  <table class='layout'>
   <tr>
    <td class='sidebar' rowspan='2'>
     <p>
      Navigation menu
     </p>
     <ul class='toc'>
      <li>
       <a href='http://libnoise.sourceforge.net/index.html'>Main</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/downloads/index.html'>Downloads</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/coherentnoise/index.html'>What is coherent noise?</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/noisegen/index.html'>Generating coherent noise</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/glossary/index.html'>Glossary</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/examples/index.html'>Examples</a>
       <ul class='toc'>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/textures/index.html'>Procedural textures</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/complexplanet/index.html'>Complex planetary surface</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/examples/worms/index.html'>Perlin worms</a>
        </li>
       </ul>
      </li>
      <li>
       <strong>Docs</strong>
      </li>
      <li>
       <a href='tutorials/index.html'>Tutorials</a>
       <ul class='toc'>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial1.html'>Tutorial 1</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial2.html'>Tutorial 2</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial3.html'>Tutorial 3</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial4.html'>Tutorial 4</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial5.html'>Tutorial 5</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial6.html'>Tutorial 6</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial7.html'>Tutorial 7</a>
        </li>
        <li>
         <a href='http://libnoise.sourceforge.net/tutorials/tutorial8.html'>Tutorial 8</a>
        </li>
       </ul>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/cvs/index.html'>CVS</a>
      </li>
      <li>
       <a href='http://libnoise.sourceforge.net/links/index.html'>Links</a>
      </li>
     </ul>
    </td>
    <td class='header'>
     <p>
      <img src='libnoise.png' alt='libnoise logo'>
     </p>   
     <p>
      A portable, open-source, coherent noise-generating library for C++
     </p>
     <hr>
    </td>
   </tr>
   <tr>
    <td class='content'>

<!-- start rich gooey content -->
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>noise::module::Voronoi Class Reference<br>
<small>
[<a class="el" href="group__generatormodules.html">Generator Modules</a>]</small>
</h1><code>#include &lt;<a class="el" href="voronoi_8h-source.html">voronoi.h</a>&gt;</code>
<p>
<p>Inheritance diagram for noise::module::Voronoi:
<p><center><img src="classnoise_1_1module_1_1Voronoi.png" usemap="#noise::module::Voronoi_map" border="0" alt=""></center>
<map name="noise::module::Voronoi_map">
<area href="classnoise_1_1module_1_1Module.html" alt="noise::module::Module" shape="rect" coords="0,0,139,24">
</map>
<a href="classnoise_1_1module_1_1Voronoi-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Noise module that outputs <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells. 
<p>
<div align="center">
<img src="modulevoronoi.png" alt="modulevoronoi.png">
</div>
<p>
In mathematics, a <em><a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cell</em> is a region containing all the points that are closer to a specific <em>seed point</em> than to any other seed point. These cells mesh with one another, producing polygon-like formations.<p>
By default, this noise module randomly places a seed point within each unit cube. By modifying the <em>frequency</em> of the seed points, an application can change the distance between seed points. The higher the frequency, the closer together this noise module places the seed points, which reduces the size of the cells. To specify the frequency of the cells, call the <a class="el" href="classnoise_1_1module_1_1Voronoi.html#a9">SetFrequency()</a> method.<p>
This noise module assigns each <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cell with a random constant value from a coherent-noise function. The <em>displacement value</em> controls the range of random values to assign to each cell. The range of random values is +/- the displacement value. Call the <a class="el" href="classnoise_1_1module_1_1Voronoi.html#a8">SetDisplacement()</a> method to specify the displacement value.<p>
To modify the random positions of the seed points, call the <a class="el" href="classnoise_1_1module_1_1Voronoi.html#a10">SetSeed()</a> method.<p>
This noise module can optionally add the distance from the nearest seed to the output value. To enable this feature, call the <a class="el" href="classnoise_1_1module_1_1Voronoi.html#a1">EnableDistance()</a> method. This causes the points in the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells to increase in value the further away that point is from the nearest seed point.<p>
<a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells are often used to generate cracked-mud terrain formations or crystal-like textures<p>
This noise module requires no source modules. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a0">Voronoi</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a1">EnableDistance</a> (bool enable=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables or disables applying the distance from the nearest seed point to the output value.  <a href="#a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a2">GetDisplacement</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the displacement value of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells.  <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a3">GetFrequency</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the frequency of the seed points.  <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a4">GetSourceModuleCount</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of source modules required by this noise module.  <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a5">GetSeed</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the seed value used by the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells.  <a href="#a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a6">IsDistanceEnabled</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines if the distance from the nearest seed point is applied to the output value.  <a href="#a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a7">GetValue</a> (double x, double y, double z) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates an output value given the coordinates of the specified input value.  <a href="#a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a8">SetDisplacement</a> (double displacement)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the displacement value of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells.  <a href="#a8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a9">SetFrequency</a> (double frequency)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the frequency of the seed points.  <a href="#a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#a10">SetSeed</a> (int seed)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the seed value used by the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells.  <a href="#a10"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0" doxytag="noise::module::Voronoi::m_displacement"></a>
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#p0">m_displacement</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scale of the random displacement to apply to each <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cell. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1" doxytag="noise::module::Voronoi::m_enableDistance"></a>
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#p1">m_enableDistance</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines if the distance from the nearest seed point is applied to the output value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2" doxytag="noise::module::Voronoi::m_frequency"></a>
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#p2">m_frequency</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frequency of the seed points. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p3" doxytag="noise::module::Voronoi::m_seed"></a>
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnoise_1_1module_1_1Voronoi.html#p3">m_seed</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Seed value used by the coherent-noise function to determine the positions of the seed points. <br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="noise::module::Voronoi::Voronoi"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Voronoi::Voronoi           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor. 
<p>
The default displacement value is set to <a class="el" href="group__generatormodules.html#ga23">noise::module::DEFAULT_VORONOI_DISPLACEMENT</a>.<p>
The default frequency is set to <a class="el" href="group__generatormodules.html#ga24">noise::module::DEFAULT_VORONOI_FREQUENCY</a>.<p>
The default seed value is set to <a class="el" href="group__generatormodules.html#ga25">noise::module::DEFAULT_VORONOI_SEED</a>.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a1" doxytag="noise::module::Voronoi::EnableDistance"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void noise::module::Voronoi::EnableDistance           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>enable</em> = <code>true</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Enables or disables applying the distance from the nearest seed point to the output value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>enable</em>&nbsp;</td><td>Specifies whether to apply the distance to the output value or not.</td></tr>
  </table>
</dl>
Applying the distance from the nearest seed point to the output value causes the points in the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells to increase in value the further away that point is from the nearest seed point. Setting this value to <em>true</em> (and setting the displacement to a near-zero value) causes this noise module to generate cracked mud formations.     </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="noise::module::Voronoi::GetDisplacement"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">double noise::module::Voronoi::GetDisplacement           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the displacement value of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The displacement value of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells.</dd></dl>
This noise module assigns each <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cell with a random constant value from a coherent-noise function. The <em>displacement value</em> controls the range of random values to assign to each cell. The range of random values is +/- the displacement value.     </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="noise::module::Voronoi::GetFrequency"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">double noise::module::Voronoi::GetFrequency           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the frequency of the seed points. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The frequency of the seed points.</dd></dl>
The frequency determines the size of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells and the distance between these cells.     </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="noise::module::Voronoi::GetSeed"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int noise::module::Voronoi::GetSeed           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the seed value used by the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The seed value.</dd></dl>
The positions of the seed values are calculated by a coherent-noise function. By modifying the seed value, the output of that function changes.     </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="noise::module::Voronoi::GetSourceModuleCount"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual int noise::module::Voronoi::GetSourceModuleCount           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the number of source modules required by this noise module. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The number of source modules required by this noise module. </dd></dl>

<p>
Implements <a class="el" href="classnoise_1_1module_1_1Module.html#a3">noise::module::Module</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="noise::module::Voronoi::GetValue"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">double Voronoi::GetValue           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname" nowrap> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>double&nbsp;</td>
          <td class="mdname" nowrap> <em>z</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"> const<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Generates an output value given the coordinates of the specified input value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The <em>x</em> coordinate of the input value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>The <em>y</em> coordinate of the input value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>z</em>&nbsp;</td><td>The <em>z</em> coordinate of the input value.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The output value.</dd></dl>
<dl compact><dt><b>Precondition:</b></dt><dd>All source modules required by this noise module have been passed to the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method.</dd></dl>
Before an application can call this method, it must first connect all required source modules via the <a class="el" href="classnoise_1_1module_1_1Module.html#a5">SetSourceModule()</a> method. If these source modules are not connected to this noise module, this method raises a debug assertion.<p>
To determine the number of source modules required by this noise module, call the <a class="el" href="classnoise_1_1module_1_1Voronoi.html#a4">GetSourceModuleCount()</a> method. 
<p>
Implements <a class="el" href="classnoise_1_1module_1_1Module.html#a4">noise::module::Module</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="noise::module::Voronoi::IsDistanceEnabled"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">bool noise::module::Voronoi::IsDistanceEnabled           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Determines if the distance from the nearest seed point is applied to the output value. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd><ul>
<li><em>true</em> if the distance is applied to the output value.</li><li><em>false</em> if not.</li></ul>
</dd></dl>
Applying the distance from the nearest seed point to the output value causes the points in the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells to increase in value the further away that point is from the nearest seed point.     </td>
  </tr>
</table>
<a class="anchor" name="a8" doxytag="noise::module::Voronoi::SetDisplacement"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void noise::module::Voronoi::SetDisplacement           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>displacement</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the displacement value of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>displacement</em>&nbsp;</td><td>The displacement value of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells.</td></tr>
  </table>
</dl>
This noise module assigns each <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cell with a random constant value from a coherent-noise function. The <em>displacement value</em> controls the range of random values to assign to each cell. The range of random values is +/- the displacement value.     </td>
  </tr>
</table>
<a class="anchor" name="a9" doxytag="noise::module::Voronoi::SetFrequency"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void noise::module::Voronoi::SetFrequency           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">double&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>frequency</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the frequency of the seed points. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>frequency</em>&nbsp;</td><td>The frequency of the seed points.</td></tr>
  </table>
</dl>
The frequency determines the size of the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells and the distance between these cells.     </td>
  </tr>
</table>
<a class="anchor" name="a10" doxytag="noise::module::Voronoi::SetSeed"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void noise::module::Voronoi::SetSeed           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>seed</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the seed value used by the <a class="el" href="classnoise_1_1module_1_1Voronoi.html">Voronoi</a> cells. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>seed</em>&nbsp;</td><td>The seed value.</td></tr>
  </table>
</dl>
The positions of the seed values are calculated by a coherent-noise function. By modifying the seed value, the output of that function changes.     </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="voronoi_8h-source.html">voronoi.h</a><li>voronoi.cpp</ul>
<!-- end rich gooey content -->

    </td>
   </tr>
   <tr>
    <td class='footer' colspan='2'>
     <p>
      &copy; 2003-2005 Jason Bevins
     </p>
     <p>
      <a href='http://www.doxygen.org/'><img src='doxygen.png' alt='Doxygen logo'></a>
      <br>
      The libnoise source documentation was generated by <a href='http://www.doxygen.org/'>doxygen</a> 1.3.9.1
     </p>
    </td>
   </tr>
  </table>
 </body>
</html>
